import { DEFAULT_LAYOUT } from '../base'
import { AppRouteRecordRaw } from '../types'
import permissionType from "@/utils/permissionType";

const BASEDATA: AppRouteRecordRaw = {
  path: '/basedata',
  name: 'basedata',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: '基础数据',
    requiresAuth: true,
    icon: 'icon-menu',
    order: 2,
  },
  children: [
    {
      path: 'class',
      name: 'class',
      component: () => import('@/views/basedata/class/index.vue'),
      meta: {
        locale: '班级管理',
        requiresAuth: true,
        roles: [permissionType.baseData_class, permissionType.pingTaiLogin],
      },
    },
    {
      path: 'student',
      name: 'student',
      component: () => import('@/views/basedata/student/index.vue'),
      meta: {
        locale: '学生管理',
        requiresAuth: true,
        roles: [permissionType.baseData_student, permissionType.pingTaiLogin],
      },
    },
  ],
}

export default BASEDATA
